//
//  HostablityViewController.m
//  penzer
//
//  Created by caiyc on 2018/10/15.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "HostablityViewController.h"

@interface HostablityViewController ()
@property (weak, nonatomic) IBOutlet UILabel *total_Live;
@property (weak, nonatomic) IBOutlet UILabel *totalFans;
@property (weak, nonatomic) IBOutlet UILabel *total_Money;
@property (weak, nonatomic) IBOutlet UILabel *totalpeos;
@property (weak, nonatomic) IBOutlet UILabel *total_time;
@property (weak, nonatomic) IBOutlet UILabel *totalSale;

@end

@implementation HostablityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
-(void)loadData{
    NSDictionary *param = @{@"ac":@"member",@"op":@"member",@"ctrl":@"live",@"anchor_id":self.hostId,@"ta":@"anchor_nl"};
    [self weqPostHandle:param success:^(id response) {
        if(response){
            NSDictionary *datas = response[@"data"];
            self.totalFans.text = [NSString stringWithFormat:@"%@个",datas[@"fans"]];
            self.totalpeos.text =  [NSString stringWithFormat:@"%@个",datas[@"man"]];
            self.total_Live.text = [NSString stringWithFormat:@"共直播%@场",datas[@"chang"]];
            self.total_Money.text =   [NSString stringWithFormat:@"%@元",datas[@"total_price"]];
            self.totalSale.text=  [NSString stringWithFormat:@"%@件",datas[@"salegoods"]];
            self.total_time.text = [NSString stringWithFormat:@"%@小时",datas[@"live_length"]];
        }
    } failure:^(NSError *error) {
        
    }];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
